// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	condition = get_sdf(53,1) == 0;
	nextstate = -1;
	question = "special";
	text1 = "You step out into the wasteland. This is the southern front of the war between the rebels and the forces of General Alwan. Once, the rebels had pushed through the line of forts to the west. Then the Storm Plains pushed them back to here.";
	text2 = "This open, flat stretch of land is far above the fields and woods of the Storm Plains. The air up here is cold and crisp, though the scent of rot and smoke is always present.";
	text3 = "Everywhere you look, you can see the signs of battle. Scorched earth. Bones picked clean by vultures. The tracks of rogue creations, looking for carrion. It is a grim, blasted land, unfit for settlement by civilized beings.";
	text4 = "Miles to the southeast, across this dark land, the mountains resume, stretching up far above you. Even from this distance, you can make out pillars and huge stone structures. You are just making out Gazaki-Uss, the drakon city.";
	text5 = "It is in sight, but it is still a long journey. With many rogues to face along the way.";
	action = SET_SDF 53 1 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(54,1) == 0;
	question = "special";
	text1 = "There used to be a mine here, probably to extract precious metals from the earth. The ore was dug out and carted off, and the waste was dumped into the river.";
	text2 = "Once this whole region became a battlefield, the mine was abandoned. A small tribe of serviles moved in. The savage, rebel variety, with the alarming patterns of tattoos and facial scars.";
	action = SET_SDF 54 1 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The box contains some scraps of paper, left behind by the miners who fled this claim several years ago. Only one of them is still readable:";
	text2 = "_While digging, look for quality gemstones. The sort that can be used to create wands. The anvil is here in the fort, and such wands grow more valuable every day with the war approaching._";
	text3 = "_I am trying to obtain the scales of the greater reptilian creations. Drayks and drakons. Combine the correct scale with the correct binding agent, be it saltweed or wiry moss, and the results are dramatic._";

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The road is patrolled by a pack of creations. You aren't sure whether they were sent by the rebels or the Shapers. When you get close to them, they approach you and wait for you to identify yourself. You suspect they won't wait long.";
	text2 = "You stare back at them, not sure what to do. When they realize that you don't have anything to show them, they attack.";
	text3 = "When they get close, you hold up your amulet. This seems to have an effect on them. Something in their simple minds recalls that they were given instructions to follow should that trinket be presented to them.";
	text4 = "You do your best to take advantage of this lull and calm them. However, you aren't authoritative enough. The moment of confusion passes, and the creatures forget what to do when they see the amulet. Then they fall back to their default plan ...";
	text5 = "You do your best to take advantage of this lull and calm them. You are authoritative enough to comfort the creatures. They walk down the road past you, leaving you in peace";
	code =
		clear_strings();
		as(1);
		if (has_spec_item(2) == 0)
			as(2);
			else {
				as(3);
				if (get_stat(20) < 7)
					as(4);
					else {
						as(5);
						sf(54,14,1);
						}
				}
	break;

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "A servile confronts you. Her face is covered with an intricate pattern of scars, and crude, black tattoos run across the backs of her hands and up her arms.";
	text2 = "When she meets you, she lets out a long, angry hiss. Servile cultists like this tend to have a hard time telling different sorts of humans apart, so they make things easier by hating all of them.";
	text3 = "When she meets you, she lets out a long, angry hiss. Even though you are a fellow servile, she deems you to be tainted by excessive human influence.";
	text4 = "You hold up your amulet of passage. She ignores it.";
	text5 = "Then she shouts an alarm.";
	code =
		if (creature_type(pc_num()) == 46) 
			rs(2);
			else rs(3);
		if (has_spec_item(2) == 0)
			rs(4);
	break;
	
begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Shaper Fort - West";
	text3 = "  Gazaki-Uss - Southeast";
	text4 = "  Remember, report all sightings of unfamiliar humans to a drakon!";
	
begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign by this path says:";
	text2 = "  TUNNEL SEALED BY ORDER OF GHALDRING";

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "There is a dark tunnel into the cave wall to the north. Even from here, you can feel the cold and smell the rot that emanates from it. Something about it makes you shudder.";
	text2 = "And, if brief exposure puts you on edge, you can only imagine what it's been doing to the drayk and the band of serviles on guard here. They all look pale and twitchy. When you get close, the serviles draw their weapons.";
	text3 = "The drayk keeps them from attacking with a wave of his claw. Then he walks forward to greet you. _Hsssss ... I am Cenasso, of the court of Ghaldring. Show that you are allowed to be here, or die._";
	text5 = "Cenasso tries to speak with you, but most of his effort is spent holding back the serviles from attacking. They are the fierce, tribal variety, and their fear and hatred of outsiders is great.";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = -1;
	condition = gf(54,3) == 0 && has_spec_item(2) == 0;
	question = "I don't have any pass. I am just traveling through.";
	text1 = "One of the serviles screams, _Spy! Spy!_ Cenasso shouts at them to wait, but they finally decide to ignore him. _Slay the intruder!_";
	text2 = "In the end, regretfully, the drayk needs to join in the attack.";
	action = END_TALK;
	code =
		set_attitude(1006,10);
	break;
	
begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = gf(54,3) == 0 && has_spec_item(2) > 0;
	question = "I have this. (Show the amulet.)";
	text1 = "Cenasso looks at the amulet and turns to the serviles. _Hssss ... See? The traveler is allowed by Ghaldring. We must only slay if we must. Say, to prevent from entering the cave._";
	text2 = "The drayk turns back to you. _You may leave. We are only here to guard the tunnel. As long as you do not try to pass, you are safe._";
	code =
		sf(54,3,10);
	break;
	
begintalknode 13;
	state = 10;
	nextstate = -1;
	condition = gf(54,3) == 0;
	question = "I will not identify myself to you.";
	text1 = "One of the serviles screams, _Spy! Spy!_ Cenasso shouts at them to wait, but they finally decide to ignore him. _Slay the intruder!_";
	text2 = "In the end, regretfully, the drayk needs to join in the attack.";
	action = END_TALK;
	code =
		set_attitude(1006,10);
	break;

begintalknode 14;
	state = 10;
	nextstate = 11;
	condition = gf(54,3) > 0;
	question = "What can you tell me about Ghaldring?";
	text1 = "The serviles start muttering to each other, _Spy. Spy!_ Cenasso ignores them.";
	text2 = "_Ghaldring is the master of drakons. He leads the rebellion from Gazaki-Uss. None question his rule. None who want to live, that is._";

begintalknode 15;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "How do I reach Ghaldring?";
	text1 = "The drayk points to the southeast. _Travel down there. Stay on the road. Keep the amulet handy._";

begintalknode 16;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "And who questions Ghaldring's rule?";
	text1 = "_Some in the rebellion think that the drakons grow too arrogant. They are fools._ The serviles start muttering darkly to each other. Cenasso quickly adds, _But that is not something we speak of with outsiders._";

begintalknode 17;
	state = 10;
	nextstate = 12;
	condition = gf(54,3) > 0;
	question = "Tell me about that tunnel.";
	text1 = "The serviles' hands tighten on their weapons. Cenasso says, _We are here to seal the tunnel. Those are our orders. None go in. None come out._";

begintalknode 18;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "But what is in there?";
	text1 = "_That is the business of rebels. Know, however, that it is an old crypt, and it has become infested with undead. And dangerous, traitorous creations. Staying away is wise._";
	text2 = "Traitorous creations? Odd. Cenasso doesn't seem inclined to elaborate.";
	
begintalknode 19;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "I will not enter.";
	text1 = "_Then I have said all to you that I need to._ He casts a worried look at the serviles. _You need to leave now. Walk past us, and we must attack you._";
	action = END_TALK;
	
begintalknode 20;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "I need to enter the tunnel.";
	text1 = "The serviles tense up, ready to fight. Cenasso says, _You do not have the authority to enter. I hope, for both our sakes, that you leave soon._";

begintalknode 21;
	state = 13;
	nextstate = -1;
	condition = get_stat(20) < 9;
	question = "Doesn't the amulet give me the right to go where I want?";
	text1 = "Cenasso looks very uncomfortable. _The orders I was given were unclear. We must err on the side of caution. You must go. Walk past us, and we must attack you._";

begintalknode 22;
	state = 13;
	nextstate = -1;
	condition = get_stat(20) >= 9 && gf(60,9) != 11;
	question = "Ghaldring gave me this amulet so I could do his bidding. He needs me to enter the tunnel. (Lie.)";
	text1 = "Cenasso believes you. He looks extremely uncomfortable. The serviles are comparably confused. _Our orders are ... But ... We can't anger Ghaldring._";
	text2 = "Finally, after a whispered consultation, they come up with a way out of their conundrum. _We must go and get new orders. Then we will know how to deal with you. Just wait here._";
	text3 = "The drayk and the serviles gather their things and walk quickly to the south. They leave you alone with the tunnel.";
	action = END_TALK;
	code =	
		sf(54,4,1);
		award_party_xp(150,18);
		set_act_at_dist(1006,1);
	break;

begintalknode 23;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "All right. I will leave.";
	text1 = "The drayk looks very relieved as you turn to go. _I thank you, traveler. You must go. Walk past us toward the tunnel, and we must attack you._";
	action = END_TALK;

begintalknode 24;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "I need to pass. Step aside or die.";
	text1 = "One of the serviles screams, _Spy! Spy!_ Cenasso shouts at them to wait, but they finally decide to ignore him. _Slay the intruder!_";
	text2 = "The drayk reluctantly joins in the battle.";
	action = END_TALK;
	code =
		set_attitude(1006,10);
	break;

begintalknode 25;
	state = 10;
	nextstate = -1;
	condition = gf(54,3) > 0;
	question = "Tell me about this area.";
	text1 = "_I can tell you nothing but to stay on the road. I am sure you don't want to be mistaken for a spy._";

begintalknode 26;
	state = 10;
	nextstate = -1;
	condition = gf(54,3) > 0;
	question = "I will leave now.";
	text1 = "The drayk looks very relieved as you turn to go. _I thank you, traveler. You must go. Walk past us toward the tunnel, and we must attack you._";
	action = END_TALK;

begintalknode 27;
	state = 13;
	nextstate = -1;
	condition = get_stat(20) >= 5 && gf(60,9) == 11;
	question = "Ghaldring gave me orders to come here and clear a path to Tholosss. Step aside.";
	text1 = "Cenasso believes you. The serviles are skeptical, but they don't want to disobey Ghaldring.";
	text2 = "Finally, after a whispered consultation, they decide to take the path of least resistance. The drayk and the serviles gather their things and walk quickly to the south. They leave you alone with the tunnel.";
	action = END_TALK;
	code =	
		sf(54,4,1);
		set_act_at_dist(1006,1);
	break;

begintalknode 28;
	state = 13;
	nextstate = -1;
	condition = get_stat(20) < 5 && gf(60,9) == 11;
	question = "Ghaldring gave me orders to come here and clear a path to Tholosss. Step aside.";
	text1 = "Cenasso believes you, but the serviles don't. After a whispered consultation, they take the route they decide is least likely to get Ghaldring angry at them.";
	text2 = "_No. We can't take the chance of letting someone in to see the spy. We stay here and guard the tunnel._";



	
//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 34;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 35;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 36;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 37;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 38;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 39;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 40;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 41;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 42;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 43;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 44;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 59;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 60;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 62;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 63;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 64;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		